﻿<local:CommandView x:Class="cmdr.Editor.Views.CommandViews.IntCommandView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:cmdr.Editor.Views.CommandViews"
             xmlns:controls="clr-namespace:cmdr.WpfControls.CustomSlider;assembly=cmdr.WpfControls"
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="200">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Label>Value:</Label>
        <DockPanel Grid.Row="1" VerticalAlignment="Center" Margin="10">
            <TextBox x:Name="tbValue" Text="{Binding ElementName=slValue, Path=Value, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" TextAlignment="Center" VerticalContentAlignment="Center" DockPanel.Dock="Right" Width="40" PreviewKeyDown="TextBox_KeyDown" />
            <controls:CustomSlider x:Name="slValue" Margin="0,0,10,0" TickFrequency="{Binding TickFrequency}" IsSnapToTickEnabled="False" LargeChange="5" SmallChange="1" TickPlacement="BottomRight"  Value="{Binding Value, Mode=TwoWay}" Minimum="{Binding MinValue, Mode=OneWay}" Maximum="{Binding MaxValue, Mode=OneWay}" />
        </DockPanel>
    </Grid>
</local:CommandView>
